package gui;

import javax.swing.*;
import java.awt.event.*;

public class Console {
		private static String version = "Compiler v1.0";
	public static void run(JApplet applet, int width, int height) {
		JFrame frame = new JFrame(version);
		myFrame = frame;
		myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		myFrame.getContentPane().add(applet);
		myFrame.setSize(width, height);
		applet.init();
		applet.start();
		myFrame.setVisible(true);
		myFrame.setResizable(true);
	}

	public static void resize(int width, int height) {
		myFrame.setSize(width * 31 + 6, height * 31 + 104);
	}

	private static JFrame myFrame;

}
